//
//  File1.swift
//  PlayGround
//
//  Created by admin on 2021/9/17.
//

import Foundation
import UIKit
class FloatView: SettingInputView {
    
    lazy var input: UITextField = {
        let aview = UITextField()
        aview.placeholder = "0"
        aview.keyboardType = .decimalPad
        aview.font = .systemFont(ofSize: 14)
        return aview
    }()
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        addSubview(titleLab)
        addSubview(input)
    }
    override var value:Any{
        input.resignFirstResponder()
        return input.text.int()
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    override func layoutSubviews() {
        super.layoutSubviews()
        titleLab.snp.makeConstraints { snp in
            snp.left.equalToSuperview().offset(10)
            snp.centerY.equalToSuperview()
        }
        input.snp.makeConstraints { snp in
            snp.right.equalToSuperview().offset(-10)
            snp.centerY.equalToSuperview()
        }
    }
}
